lib=libmymath.a
dymiclib = libmydymic.so
.PYONY:all
all:$(lib) $(dymiclib)
$(lib):mymath.o
	ar -rc $@ $^
mymath.o:mymath.c
	gcc -c $^
$(dymiclib):myhello.o myprint.o
	gcc -shared -o $@ $^
myhello.o:myhello.c
	gcc -fPIC -c $^
myprint.o:myprint.c
	gcc -fPIC -c $^
.PYONY:clean
clean:
	rm -rf *.o *.a mylib *.so 
.PYONY:output
output:
	mkdir -p mylib/include
	mkdir -p mylib/lib
	cp *.h mylib/include
	cp *.a mylib/lib
	cp *.so mylib/lib

